package com.ruoyi.organization.mapper;

import com.ruoyi.organization.domain.BizPeople;
import com.ruoyi.organization.domain.vo.FamilyScoreLogViewVo;
import com.ruoyi.organization.domain.vo.InnerBizBrid;
import com.ruoyi.organization.domain.vo.SystemBoardViewVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 村民Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
public interface BizPeopleMapper {
    /**
     * 查询村民
     *
     * @param peopleId 村民主键
     * @return 村民
     */
    public BizPeople selectBizPeopleByPeopleId(Long peopleId);

    public BizPeople selectBizPeopleByNameAndMobile(@Param("peopleName") String peopleName
            , @Param("peopleMobile") String peopleMobile);


    /**
     * 查询村民列表
     *
     * @param bizPeople 村民
     * @return 村民集合
     */
    public List<BizPeople> selectBizPeopleList(BizPeople bizPeople);

    /**
     * 新增村民
     *
     * @param bizPeople 村民
     * @return 结果
     */
    public int insertBizPeople(BizPeople bizPeople);

    /**
     * 修改村民
     *
     * @param bizPeople 村民
     * @return 结果
     */
    public int updateBizPeople(BizPeople bizPeople);

    /**
     * 删除村民
     *
     * @param peopleId 村民主键
     * @return 结果
     */
    public int deleteBizPeopleByPeopleId(Long peopleId);

    /**
     * 批量删除村民
     *
     * @param peopleIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBizPeopleByPeopleIds(Long[] peopleIds);

    List<BizPeople> getListByCards(@Param("cards") List<String> cards);

    /**
     * 户主身份证号码
     *
     * @param headCard
     * @return
     */
    BizPeople findByHeadCard(String headCard);

    BizPeople findByPeopleCard(String headCard);

    /**
     * 手机号码查询
     *
     * @param mobile
     * @return
     */
    BizPeople findByMobile(String mobile);
    BizPeople findByMobile2(@Param("mobile") String mobile);

    List<BizPeople> familyPeople(BizPeople bizPeople);

    public SystemBoardViewVo systemBoardView();

    public List<FamilyScoreLogViewVo> getScoreLogGroupByDay(@Param("startDay") String startDate, @Param("endDay") String endDate);

    /**
     * 审核状态
     *
     * @param i
     * @return
     */
    long selectBizPeopleByStatus(Integer i);

    /**
     * 网格员总数
     *
     * @return
     */
    Long selectIsGrids();

    /**
     * 重置解绑村民微信
     *
     * @param peopleIdList
     * @return
     */
    int resetPeopleOpenId(@Param("peopleIdList") List<Long> peopleIdList);

    int resetWx(@Param("bizPeople") BizPeople newPeople);

    BizPeople selectBizPeopleByPeopleName(@Param("peopleName") String peopleName);

    List<BizPeople> selectPeopleNotHead(@Param("headCard") String headCard);

    List<BizPeople> find(@Param("communityId") Long communityId);

    List<BizPeople> selectPeopleHead(@Param("headCard") String headCard);

    BizPeople findIsParty(@Param("headCard") String headCard);
}
